package com.qingxin.sys.smslib;

import com.qingxin.sys.support.SystemCfg;

public class SmsSetting {

	private String id;				//网关id
	private String comPort;			//COM口名称，如COM1、COM2等
	private int baudRate;		//串口波特率
	private String manufacturer;	//开发商
	private String model;			//型号
	
	private String simPin;//sim卡锁，一般默认为0000或1234
	private boolean smsLog;//是否打印日志
	
	
	public SmsSetting() {
		this("smsgateway", SystemCfg.getProp("sms-com-port"),
				Integer.parseInt(SystemCfg.getProp("sms-baud-rate")),
				SystemCfg.getProp("sms-manufacturer"),
				SystemCfg.getProp("sms-model"),
				SystemCfg.getProp("sms-sim-pin"),
				"true".equals(SystemCfg.getProp("sms-log")));
	}
	
	
	public SmsSetting(String id, String comPort, int baudRate,
			String manufacturer, String model, String simPin, boolean smsLog) {
		this.id = id;
		this.comPort = comPort;
		this.baudRate = baudRate;
		this.manufacturer = manufacturer;
		this.model = model;
		this.simPin = simPin;
		this.smsLog = smsLog;
	}
	
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getComPort() {
		return comPort;
	}
	public void setComPort(String comPort) {
		this.comPort = comPort;
	}
	public int getBaudRate() {
		return baudRate;
	}
	public void setBaudRate(int baudRate) {
		this.baudRate = baudRate;
	}
	public String getManufacturer() {
		return manufacturer;
	}
	public void setManufacturer(String manufacturer) {
		this.manufacturer = manufacturer;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getSimPin() {
		return simPin;
	}
	public void setSimPin(String simPin) {
		this.simPin = simPin;
	}
	public boolean isSmsLog() {
		return smsLog;
	}
	public void setSmsLog(boolean smsLog) {
		this.smsLog = smsLog;
	}
	
	
}
